package com.zood.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zood.domain.model;
import org.apache.ibatis.annotations.*;

import java.util.List;


@Mapper
public interface ModelDao extends BaseMapper<model> {
    @Select("SELECT * FROM t_model WHERE mid=#{mid} && tid=#{tid}")
    model getById(int mid,int tid);

    @Delete("delete  FROM t_model WHERE mid=#{mid} && tid=#{tid}")
    boolean deleteById(int mid,int tid);

    @Update("UPDATE t_model SET name=#{name}  WHERE mid=#{mid} && tid=#{tid} ")
    boolean update(model model);

    @Select("SELECT * FROM t_model ")
    List<model> selectList();
}
